IApi.WriteOutputBit 方法
将一个位元写入实体或模拟 I/O 模组的输出。
命名空间:IntervalZero.KINGSTAR.Base.Api组合: IntervalZero.KINGSTAR.Base.Api (于 IntervalZero.KINGSTAR.Base.dll) 版本:4.4.0.0
语法
KsError WriteOutputBit(
int Index,
int BitOffset,
bool Value
)
Function WriteOutputBit(
Index As Integer,
BitOffset As Integer,
Value As Boolean
) As KsError
参数
Index
型别:int
I/O 模组的索引。索引以 0 为起始;别名将影响此参数。
BitOffset
型别:int
指定位元偏移量到一个位置,以写入位元值。最大偏移量由 SlaveStatus 类别中的 OutputLength决定。
Value
型别:bool
欲写入的值。true:写入 1;false:写入 0。
回传值
型别:KsError
方法的回传值。
备注
WriteOutputBit 仅能在连结建立并开始启用时才能呼叫。
可用的 EtherCAT 状态
ecatOP
范例
N/A
参见